<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .container{
            width:500px;
            background-color: #666;
        }
        .container::after{
            content:"";
            display:block;
            clear:both;
        }
        .box{
            width:100px;
            height:100px;
            background-color: blue;
            margin: 5px;
            float:left;
        }
        .box1{
            width:100px;
            height:100px;
            background-color: red;
            clear: both;
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="box"></div>
        <div class="box"></div>
        <div class="box"></div>
        <div class="box"></div>
    </div>
    <div class="box1"></div>
</body>
</html>